﻿using QLNH_BUS_WS.QLNH_DAL_WS;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace QLNH_BUS_WS
{
    public class AccountBUS
    {
        public AccountDetailDTO GetAccoutInfo(string username)
        {
            QLNH_DAL_WebServiceSoapClient ws = new QLNH_DAL_WebServiceSoapClient();
            return ws.GetAccoutInfo(username);
        }

        public bool IsValidAccount(string username)
        {
            QLNH_DAL_WebServiceSoapClient ws = new QLNH_DAL_WebServiceSoapClient();
            return ws.IsValidAccount(username);
        }

        public RoleDTO[] GetAllRole()
        {
            QLNH_DAL_WebServiceSoapClient ws = new QLNH_DAL_WebServiceSoapClient();
            return ws.GetAllRole();
        }

        public AccountDetailDTO[] GetAllAccountDetail(string username, string roleID)
        {
            QLNH_DAL_WebServiceSoapClient ws = new QLNH_DAL_WebServiceSoapClient();
            return ws.GetAllAccountDetail(username, roleID);
        }

        public bool AddCount(AccountDTO acc)
        {
            QLNH_DAL_WebServiceSoapClient ws = new QLNH_DAL_WebServiceSoapClient();
            return ws.AddAccount(acc);
        }

        public bool EditAccount(AccountDTO acc)
        {
            QLNH_DAL_WebServiceSoapClient ws = new QLNH_DAL_WebServiceSoapClient();
            return ws.EditAccount(acc);
        }

        public bool RemoveAccount(string id)
        {
            QLNH_DAL_WebServiceSoapClient ws = new QLNH_DAL_WebServiceSoapClient();
            return ws.RemoveAccount(id);
        }
    }
}